/**************************
 * mm.h -- the header file for mm.c 
 * This should contain all the dynamic
 * memory manager functions
 *
 *
 *************************/

#ifndef _MM_H_
#define _MM_H_

typedef struct binfo 			//struct that stores all important information for each byte
{					//this storage method makes searching through memory much simpler
	unsigned short in_use;		//whether or not the byte is free
	int chunk_size;			//size of the chunk allocated to this byte. 0 when mm_alloc hasn't set a chunk to start there
					//can only free if chunk_size > 0.
} byteinfo;

char *pool;				//the pool where memory is stored
byteinfo *memstatus;			//keeps track of which parts of the memory are allocated

int mm_init(unsigned long size);
int mm_end();
char *mm_alloc(unsigned long no_of_chars);
int mm_free(char *ptr);
int mm_assign(char *ptr, char val);

#endif
